/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package trabalho.pkg3;

import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Victor
 */
public class Trabalho3 {

    private static Cliente cliente;
    private static Servidor servidor;
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        cliente = new Cliente();
        InfoArq teste = new InfoArq("teste.txt");
        teste.setHosts("192.168.1.100");
        teste.setSize(4096);
        teste.setNomeArq("teste.txt");
        System.out.println("teste");
        try {
            teste.grava();
        } catch (IOException ex) {
            Logger.getLogger(Trabalho3.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        try {
            servidor = new Servidor(Integer.parseInt(args[1]));
            servidor.start();
            cliente.main(args);
        } catch (ClassNotFoundException | IOException ex) {
            Logger.getLogger(Trabalho3.class.getName()).log(Level.SEVERE, null, ex);
        }
        
    }
}
